package xuanke;

public class Person {
    // 受保护属性，子类可继承访问
    protected String id;
    protected String name;
    protected String gender;

    // 父类构造方法
    public Person(String id, String name, String gender) {
        this.id = id;
        this.name = name;
        this.gender = gender;
    }

    // 父类业务方法：打印个人信息（子类可重写）
    public void printInfo() {
        System.out.println("编号：" + id + "，姓名：" + name + "，性别：" + gender);
    }
}
